feat: add spam penalty threshold for leaderboard ranking#129
feat: add spam penalty threshold for leaderboard ranking#129amitb0ra wants to merge 2 commits intoRocketChat:masterfrom
Conversation
Sing-Li
left a comment
There was a problem hiding this comment.
Not a good idea to use env var for this. Should be UI driven from admin panel. Please change.
- Add configurable spamPenaltyThreshold to demote spam-heavy contributors - Add POST /setSpamPenaltyThreshold admin endpoint (UI-driven per reviewer feedback) - Expose spamPenaltyThreshold in GET /config response - Pass threshold to API.getRanks() in /rank and /contributor endpoints - Apply penalty sort in frontend (fetch config before data) - Add spamPenaltyThreshold to config-example.json
799782c to
65fe204
Compare
|
don't change any file that doesn't involve the new ranking code -- like don't change the ci workflow! I think you need to review and understand each step that the agent proposes when vibe coding and don't just agree to every modification it wants to do (never run it in YOLO mode!). Typically, you'll need to revise its proposed action 10s of times in a vibe coding session. |
thanks for the review. added UI in admin panel also. but i haven't changed ci. could you clarify what you're seeing? |
@amitb0ra the problem is that you don't really know what the agent is doing when you used YOLO mode. It has committed CI on your behalf. Then it messed up Github history by doing a forced push. That basically wasted a lot of your and my time. Please do a clean, human examined (every line) PR, and make sure your description of the problem conform to our CONTRIBUTING guidelines (which you wrote) - explicitly stating the involvement of AI in the PR. I'll do both of us a favour and close this one. |

Summary
Adds a configurable
spamPenaltyThresholdthat demotes contributors with excessive open PRs or issues below non-penalized contributors who have merged PRs. This helps surface genuine contributors over spam-heavy accounts.How it works
When
spamPenaltyThresholdis set to a value > 0 (e.g.10):openPRsNumber >= thresholdORissuesNumber >= thresholdare marked as penalized0or absent, ranking behaves exactly as before (no penalty applied)Results